// TCPSocketDef.h

#pragma once

#include <process.h>
#include <WinSock2.h>
#include <string>
#include <functional>
#include <memory>

#define _CRT_SECURE_NO_WARNINGS

#define BUFFER_SIZE    1024

// Close Server Dialog
typedef std::function<void()> CLOSE_SERVER_DIALOG_CALLBACK;

// Close Client Dialog
typedef std::function<void()> CLOSE_CLIENT_DIALOG_CALLBACK;

// Server send error call-back, can update UI.
typedef std::function<void(void*, int)> TCP_ERROR_CALLBACK;

// Server monitor client call-back.
typedef std::function<void(void*)> TCP_ACCEPT_CALLBACK;

// Server receive call-back.
typedef std::function<void(void*, char*, DWORD, SOCKADDR_IN*)> TCP_RECEIVE_CALLBACK;

// Server interaction with out side call-back.
typedef std::function<void(void*)> TCP_CALL_CALLBACK;
